import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'zt_onboarding.controller.dart';

class ZtOnboardingPage extends StatelessWidget {
  final OnboardingController _controller = Get.put(OnboardingController());

  @override
  Widget build(BuildContext context) {
    return Container(
        decoration: const BoxDecoration(
            image: DecorationImage(
                fit: BoxFit.cover,
                image: AssetImage('assets/images/onboarding_bg.png'))),
        child: Scaffold(
          backgroundColor: Colors.transparent,
          body: PageView.builder(
            controller: _controller.pageController,
            onPageChanged: _controller.onPageChanged,
            itemCount: _controller.pages.length,
            itemBuilder: (context, index) {
              return _controller.pages[index];
            },
          ),
        ));
  }
}
